clear
close all

q1 = [sqrt(2)/2 0 0 sqrt(2)/2]; % w x y z
q2 = rand(1, 4);
q1 = normalize(q1, 'norm');
q2 = normalize(q2, 'norm');
F10 = quat2rotm(q1)'; % frame1
F20 = quat2rotm(q2)'; % frame2

r0 = [1 0 0]';
r1 = F10 * r0; % r in frame1
r2 = F20 * r0; % r in frame2

F20'*r2 ~= F10'*r1

C21 = F20*F10';

r2 ~= C21 * r1

left_operator(qxyzw(q1)) * qxyzw(q2)
right_operator(qxyzw(q2)) * qxyzw(q1)

